1. Field of the Invention
The present invention relates to an image processing apparatus which can perform quantization processing of a document image including both a character portion and a photograph portion while maintaining a high resolution of the character portion and a high gray scale characteristic of the photograph portion.
2. Description of the Related Art
In general, in an image processing apparatus such as a document image processing apparatus which can process not only code data but also image data, when image data are read by a reading means such as a scanner, image data of, e.g., characters, graphs, and the like having a contrast are subjected to simple quantization using a fixed threshold value, and image data of, e.g., photographs having a gray scale are subjected to quantization by a pseudo gray scale means such as a dithering method. The reason why such processing operations are performed is as follows. That is, when read image data are uniformly subjected to simple quantization processing using a fixed threshold value, image quality is not degraded in a character/line region since the resolution is preserved. However, image quality is degraded in a photograph region since the gray scale characteristic cannot be preserved. On the other hand, when read image data are uniformly subjected to gray scale processing by, e.g., a systematic dithering method, image quality is not degraded in a photograph region since the gray scale characteristic can be preserved. However, an image with poor image quality is formed in a character/line region since the resolution is impaired.
In this manner, when uniform quantization processing is applied to read image data, image qualities of regions having different features cannot be simultaneously satisfied.
As a means for solving such a problem, an "error diffusion method" as a quantization method which can satisfy a gray scale characteristic of a photograph image region, and has a better resolution of a character/line region than the systematic dithering method has been proposed. In this "error diffusion method", as described in the article entitled "An Adaptive Algorithm for Spatial Gray Scale" appearing in the journal "Proceeding of the S.I.D Vol. 17 2 Second Quarter 1976 p.p. 75-77", a product of a quantization error obtained when a pixel of interest is quantized by a given threshold value, and a predetermined weighting coefficient is diffused to non-quantized pixels in a predetermined region around the pixel of interest, and when the non-quantized pixels are quantized, quantization is performed while adding the diffused quantization error as a correction value.
More specifically, the "error diffusion method" diffuses a quantization error caused upon quantization of a pixel of interest to surrounding pixels to compensate for the error, thereby minimizing the quantization error. Therefore, when an input image places an importance on the gray scale as in a photograph image, quantization processing which can sufficiently satisfy the gray scale characteristic can be performed.
However, even when the "error diffusion method" is employed, in an image such as a character/line which places an importance on the resolution rather than the gray scale characteristic, the resolution of a character portion is impaired due to error correction processing.
As described above, even when the "error diffusion method" is employed, since the same quantization processing is performed for a document image including both a character region and a photograph region, processing according to features of the respective regions cannot be performed.